import typing


class Signal:

    def __init__(self) -> None:
        self.__slots = []

    def connect(self, callable: typing.Callable) -> None:
        if callable in self.__slots: return
        self.__slots.append(callable)

    def disconnect(self, callable: typing.Callable) -> None:
        self.__slots.remove(callable)

    def emit(self, *args, **kwargs) -> None:
        for callable in self.__slots:
            callable(*args, **kwargs)
